package com.zyq.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @program: spring-boot-Myplus
 * @description:
 * @author: 朱永奇
 * @create: 2024-07-13 20:47
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "员工实体类")
public class Emp {
    @ApiModelProperty(value = "员工id")
    @TableId(type = IdType.AUTO)
    private Integer empno;
    @ApiModelProperty(value = "姓名")
    @TableField(value = "e_name")
    private String name;
    @ApiModelProperty(value = "职位")
    private String job;
    @ApiModelProperty(value = "入职时间")
    private String hiredate;
    @ApiModelProperty(value = "工资")
    private double sal;
    @ApiModelProperty(value = "奖金")
    private double comm;
    @ApiModelProperty(value = "部门id")
    private int deptno;



    @ApiModelProperty(value = "手机号")
    @TableField(exist = false)
    private String phone;

    @TableField (exist = false)
    @ApiModelProperty(value = "部门")
    private Dept dept;

    public Emp(Integer empno, String name, String job, String hiredate, double sal, double comm, int deptno) {
        this.empno = empno;
        this.name = name;
        this.job = job;
        this.hiredate = hiredate;
        this.sal = sal;
        this.comm = comm;
        this.deptno = deptno;
    }
}
